import request from '@/utils/request'


//获取所有用户【非树结构】
export function apiPeoLists(params) {
  return request({
    url: '/assess/common/query/user/all',
    params,
    method: 'get',
    jy: true
  })
}
export function getKaoheList(params) {
  return request({
    url: '/jxAssessTemplate/list',
    params,
    method: 'get',
    jy: true
  })
}
//校验该模版是否发起考核
export function jiaoYanMuBan(id) {
  return request({
    url: `/jxAssessTemplate/get/${id}`,
    method: 'GET',
    jy: true
  })
}
//编辑绩效考核模版表
export function editMuaBan(data) {
  return request({
    url: '/jxAssessTemplate/edit',
    method: 'put',
    data,
    jy: true
  })
}
//
export function lookOneMuBan(id) {
  return request({
    url: `/jxAssessTemplate/get/assess/templateId/${id}`,
    method: 'get',
    jy: true
  })
}
//删除绩效考核模版表数据 逻辑删除
export function deleteKaoheList(id) {
  return request({
    url: `/jxAssessTemplate/del/${id}`,
    method: 'DELETE',
    jy: true
  })
}
//删除绩效考核模版表数据 批量删除
export function deleteAllKaoheList(params) {
  return request({
    url: `/jxAssessTemplate/del/ids`,
    method: 'delete',
    params,
    jy: true
  })
}
//删除绩效考核指标数据 批量删除
export function deleteAllzhibiao(params) {
  return request({
    url: `/jxNorm/del/ids`,
    method: 'delete',
    params,
    jy: true
  })
}
//删除绩效考核流程数据 批量删除
export function deleteAllliucheng(params) {
  return request({
    url: `/jxProcess/del/ids`,
    method: 'delete',
    params,
    jy: true
  })
}
//新增绩效考核模版表-基础信息数据
export function addOneStep(data) {
  return request({
    url: '/jxAssessTemplate/add',
    method: 'POST',
    data,
    jy: true
  })
}
//新增绩效考核模版表-基础信息数据
export function userOneStep() {
  return request({
    url: '/assess/common/query/user',
    method: 'get',
    jy: true
  })
}
//新增绩效考核模版表-基础信息数据
export function userStep() {
  return request({
    url: '/assess/common/get/basic/in/formation',
    method: 'get',
    jy: true
  })
}
//查询绩效考核指标表列表
export function getZhiBiaoList(params) {
  return request({
    url: '/jxNorm/list',
    method: 'get',
    params,
    jy: true
  })
}
//新增绩效考核模版表-考核指标数据
export function addTowStep(data) {
  return request({
    url: '/jxNorm/add',
    method: 'post',
    data,
    jy: true
  })
}
//编辑绩效考核模版表-考核指标数据
export function editTowStep(data) {
  return request({
    url: '/jxNorm/edit',
    method: 'put',
    data,
    jy: true
  })
}
//删除绩效考核模版表-考核指标数据
export function deleteTowStep(id) {
  return request({
    url: `/jxNorm/del/${id}`,
    method: 'DELETE',
    jy: true
  })
}

//查询绩效查询绩效考核流程表列表
export function getLiuChengList(params) {
  return request({
    url: '/jxProcess/list',
    method: 'get',
    params,
    jy: true
  })
}
//新增绩效考核流程数据
export function addThreeStep(data) {
  return request({
    url: '/jxProcess/add',
    method: 'post',
    data,
    jy: true
  })
}

//编辑绩效考核流程数据
export function editThreeStep(data) {
  return request({
    url: '/jxProcess/edit',
    method: 'put',
    data,
    jy: true
  })
}
//删除绩效考核流程数据
export function deleteThreeStep(id) {
  return request({
    url: `/jxProcess/del/${id}`,
    method: 'DELETE',
    jy: true
  })
}
//获取所有考核模板
export function getMubanList(params) {
  return request({
    url: '/assess/common/query/assess/template',
    method: 'get',
    params,
    jy: true
  })
}

//查询绩效考核列表
export function getJilugList(params) {
  return request({
    url: '/jxAssess/list',
    method: 'get',
    params,
    jy: true
  })
}
//查询绩效考核记录列表
export function getHistoryListOpenList(params) {
  return request({
    url: '/jxGradeChangeRecord/list',
    method: 'get',
    params,
    jy: true
  })
}
//发起考核
export function addAssessment(data) {
  return request({
    url: '/jxAssess/add',
    method: 'post',
    data,
    jy: true
  })
}
//删除发起考核数据
export function deleteAssessment(id) {
  return request({
    url: `/jxAssess/del/${id}`,
    method: 'DELETE',
    jy: true
  })
}
//查询绩效考核记录表列表
export function getViewProgress(params) {
  return request({
    url: '/jxAssessRecord/list',
    method: 'get',
    params,
    jy: true
  })
}
//查询周报
export function getWeekly(params) {
  return request({
    url: '/jxAssessRecord/weekly/report/list',
    method: 'get',
    params,
    jy: true
  })
}
//调整考核等级以及推送至看板
export function putKanBan(data) {
  return request({
    url: '/jxAssessRecord/edit/grade/or/push',
    method: 'PUT',
    data,
    jy: true
  })
}
//根据考核模版id查询考核模版
export function lookMuBans(id, type) {
  return request({
    url: `/jxAssessTemplate/get/assess/templateId/${id}/${type}`,
    method: 'get',
    jy: true
  })
}
//获取用户基本信息
export function getUserId(params) {
  return request({
    url: '/assess/common/get/basic/in/formation',
    method: 'get',
    params,
    jy: true
  })
}
//查询绩效考核记录表列表
export function getJILUdata(params) {
  return request({
    url: '/jxAssessRecord/list',
    method: 'get',
    params,
    jy: true
  })
}
//根据考核记录id和用户id查询考核模版
export function getUsersMUban(id) {
  return request({
    url: `/jxAssessRecord/get/assess/templateId/${id}`,
    method: 'get',
    jy: true
  })
}
//修改绩效考核记录表数据 ——【考核填报】—— 【考核评估】
export function putTianBao(data) {
  return request({
    url: '/jxAssessRecord/edit',
    method: 'PUT',
    data,
    jy: true
  })
}
// 查询绩效考核记录表单条数据
export function getONE(id) {
  return request({
    url: `/jxAssessRecord/get/${id}`,
    method: 'get',
    jy: true
  })
}
// ---------------------------------------

//部门考核管理
// 查询部门考核管理表列表
export function Querydepartment(params) {
  return request({
    url: '/jxDepartmentAssess/list',
    method: 'get',
    params,
    jy: true
  })
}
// 导入部门年度考核数据
export function beforeUploadlist(data) {
  return request({
    url: '/jxDepartmentAssess/importData',
    method: 'post',
    data,
    jy: true
  })
}

//批量删除部门考核管理表数据
export function deleteAllBUmen(params) {
  return request({
    url: `/jxDepartmentAssess/del/ids`,
    method: 'delete',
    params,
    jy: true
  })
}
//删除部门考核管理表数据
export function deleteBUmen(id) {
  return request({
    url: `/jxDepartmentAssess/del/${id}`,
    method: 'DELETE',
    jy: true
  })
}
//编辑部门考核管理表数据
export function editManagement(data) {
  return request({
    url: '/jxDepartmentAssess/edit',
    method: 'put',
    data,
    jy: true
  })
}
//公告表---------------------------
//查询绩效考核记录表列表
export function getGongGaoList(params) {
  return request({
    url: '/jxNotice/list',
    method: 'get',
    params,
    jy: true
  })
}
//新增公告表数据
export function addGongGao(data) {
  return request({
    url: '/jxNotice/add',
    method: 'post',
    data,
    jy: true
  })
}
//编辑公告表数据
export function editGongGao(data) {
  return request({
    url: '/jxNotice/edit',
    method: 'put',
    data,
    jy: true
  })
}
//删除公告表数据
export function deleteGongGao(id) {
  return request({
    url: `/jxNotice/del/${id}`,
    method: 'DELETE',
    jy: true
  })
}
//批量删除公告表数据
export function deleteAllGongGao(params) {
  return request({
    url: `/jxNotice/del/ids`,
    method: 'delete',
    params,
    jy: true
  })
}

//----------------

//发布绩效考核通知
export function addJixiao(data) {
  return request({
    url: '/jxNotice/release/assess/notice',
    method: 'post',
    data,
    jy: true
  })
}
//修改绩效考核通知
export function editJixiao(data) {
  return request({
    url: '/jxNotice/edit/release/assess/notice',
    method: 'POST',
    data,
    jy: true
  })
}
////====================
//查询绩效考核通知
export function getjixiaoList(params) {
  return request({
    url: '/jxNotice/query/issue/performance/notice',
    method: 'get',
    params,
    jy: true
  })
}
// 导出绩效考核记录表
export function exportForms(params) {
  return request({
    url: `/jxAssessRecord/export/data`,
    method: 'post',
    jy: true,
    params
  })
}